import {
	Http
} from '../utils/request.js'

class index extends Http {
  
  // 登录
  apiWxappLogin(data) {
    return this.request({
      url: '/wxapp-login',
      method: 'post',
      header:{
        'Content-Type':'application/json'
      },
      data,
      loading: true
    })
  }
  //查询广告/公告/弹窗列表
  apiBannerInfor(data){
    return this.request({
      url: '/banner',
      method: 'post',
      data,
      loading: true
    })
  }
   //热门搜索
   apiHotSearch(data){
    return this.request({
      url: '/hot-search',
      method: 'post',
      data,
      loading: true
    })
  }
  //查询产品
  apiProductList(data){
    return this.request({
      url: '/product-list',
      method: 'get',
      data,
      loading: true
    })
  }
  //产品详情
  apiProductInfo(data){
    return this.request({
      url: '/product-info',
      method: 'post',
      data,
      loading: true
    })
  }
  
  //产品类型列表
  apiProductType(data){
    return this.request({
      url: '/product-type',
      method: 'post',
      data,
      loading: true
    })
  }
  //满赠活动详情
  apiFullGiftInfo(data){
    return this.request({
      url: '/marketingactivity/full-gift-info',
      method: 'post',
      data,
      loading: true
    })
  }
  //提交发货
  apiMarketingactivitySubmitOrder(data){
    return this.request({
      url: '/marketingactivity/submit-order',
      method: 'post',
      header:{
        'Content-Type':'application/json'
      },
      data,
      loading: true
    })
  }
  //满减活动进度
  apiFullGiftProgress(data){
    return this.request({
      url: '/marketingactivity/full-gift-progress',
      method: 'get',
      data,
      loading: true
    })
  }
  //领取满减活动奖品
  apiFullGiftReceive(data){
    return this.request({
      url: '/marketingactivity/full-gift-receive',
      method: 'get',
      data,
      loading: true
    })
  }
  //限时秒杀产品
  apiMarketingactivitySekKillRroducts(data){
    return this.request({
      url: '/marketingactivity/sek-kill-products',
      method: 'get',
      data,
      loading: true
    })
  }
  //首页限时秒杀产品
  apiMarketingactivityWelcomeSekKill(data){
    return this.request({
      url: '/marketingactivity/welcome-sek-kill',
      method: 'get',
      data,
      loading: true
    })
  }
  //已发货订单
  apiMarketingactivitySendOrder(data){
    return this.request({
      url: '/marketingactivity/send-order',
      method: 'get',
      data,
      loading: true
    })
  }
  //未发货奖品
  apiMarketingactivityUnsentPrize(data){
    return this.request({
      url: '/marketingactivity/unsent-prize',
      method: 'get',
      data,
      loading: true
    })
  }
   //下单情况
   apiOrderBuyInfo(data){
    return this.request({
      url: '/order-buy-info',
      method: 'post',
      data,
      loading: true
    })
  }
   //产品购买情况
   apiProductBuyInfo(data){
    return this.request({
      url: '/product-buy-info',
      method: 'post',
      data,
      loading: true
    })
  }
}
export default new index()